package com.xauto.pioneer.appuser.model;

import org.json.JSONObject;

/**
 * Created by Ellis.Li on 2017/5/12.
 */
public class DeviceOrderInfo extends BaseModel<DeviceOrderInfo> {

    /** ID*/
    public String device_notify_key;
    /** 名称*/
    public JSONObject device_notify_value;
    public String device_notify_title;
    public String device_notify_description;

    @Override
    public String toString() {
        return "DeviceOrderInfo{" +
                "device_notify_key='" + device_notify_key + '\'' +
                ", device_notify_value='" + device_notify_value + '\'' +
                ", device_notify_title='" + device_notify_title + '\'' +
                ", device_notify_description='" + device_notify_description + '\'' +
                '}';
    }

    @Override
    public DeviceOrderInfo parse(JSONObject jsonObject) {
        if(jsonObject != null) {
            device_notify_key = jsonObject.optString("device_notify_key");
            device_notify_value = jsonObject.optJSONObject("device_notify_value");
            device_notify_title = jsonObject.optString("device_notify_title");
            device_notify_description = jsonObject.optString("device_notify_description");
            return this;
        }
        return null;
    }
}
